package com.retail.shop.client.impl;

import com.retail.core.entity.result.Result;
import com.retail.shop.client.RetailShopClient;
import com.retail.shop.entity.vo.RetailShopVo;
import com.retail.shop.service.RetailShopService;
import com.retail.system.entity.vo.TableTreeVo;
import com.retail.system.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class RetailShopClientImpl implements RetailShopClient {

    @Autowired
    private RetailShopService retailShopService;

    @Autowired
    private AdminService adminService;

    @Override
    public Result<List<TableTreeVo>> adminShopTableTree(Long adminId) {
        // 商户信息
        List<RetailShopVo> retailShopV1 =  retailShopService.findOwnerShopByAdminIdAndId(adminId+"");
        return Result.success(retailShopV1);
    }
}
